home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 19
/
Amiga Format CD19 (1997-10-02)(Future Publishing)(GB)(Track 1 of 5)[!][issue 1997-11].iso
/
-seriously_amiga-
/
shareware
/
misc
/
uninstaller
/
uninstallergr.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1997-08-26
|
3KB
|
86 lines
/* UnInstaller v1.0 by Panokostas Dimitris */
Options Results
addlib("libs:rexxsupport.library", 0, -30, 34)
addlib("libs:rexxreqtools.library", 0, -30, 0)
NL='0a'x
rtezrequest("Êáëþò Þëèáôå óôïí UnInstaller v1.0." || NL ||,
"Äçìéïõñãßá ôïõ Ðáíïêþóôá ÄçìÞôñç óôï 1997","ÓõíÝ÷åéá")
rtezrequest("ÐñÝðåé íá ïñéóôåß Ýíá Installer logfile","ÅðéëïãÞ logfile | Áêýñùóç")
if rtresult=0 then call Finished
logfile=rtfilerequest(, , "ÅðéëÝîôå Ýíá Installer logfile", ,)
if logfile="" then call Finished
open(1,logfile,"R")
i=0;d=0
do until eof(1)
OneLine=ReadLN(1)
If Index(OneLine,"ÁíôéãñáöÞ")>0 then do
i=i+1
InstFileTmp=substr(OneLine,pos('"',OneLine),(pos('"',OneLine,(pos('"',OneLine)+1)))-(pos('"',OneLine)-1))
InstPath=Strip(substr(OneLine,pos("óôï",OneLine)+4),,".")
If LastPos("/",InstFileTmp)>0 then InstFile=SubStr(InstFileTmp,LastPos("/",InstFileTmp)+1)
If LastPos(":",InstFileTmp)>0 then InstFile=SubStr(InstFileTmp,LastPos(":",InstFileTmp)+1)
If LastPos(":",InstFileTmp)=0 then InstFile=InstFileTmp
If Right(InstPath,2)~='/"' & Right(InstPath,2)~=':"' then InstPath=Strip(InstPath,,'"')||"/"
InstFull.I=strip(InstPath,,'"')||strip(InstFile,,'"')
end
If Index(OneLine,"Äçìéïõñãßá êáéíïýñãéïõ óõñôáñéïý")>0 then do
d=d+1
InstDrawer.d=strip(substr(OneLine,pos('"',OneLine),(pos('"',OneLine,(pos('"',OneLine)+1)))-(pos('"',OneLine)-1)),,'"')
end
end
If I>0 then
do j=1 to i
rtezrequest("ÄéáãñáöÞ áõôïý ôïõ áñ÷åßïõ;" || NL ||,
InstFull.j,"Áêýñùóç | Íáé | ¼÷é | ÄéáãñáöÞ ¼ëùí")
if rtresult=1 then call Finished
if rtresult=0 then rtezrequest("Åßóôå óßãïõñïò ãéá áõôü;","Íáé | ¼÷é")
if rtresult=1 then do
j=i
call DeleteAll
call DrawerCleanUp
end
if rtresult=2 then do
if exists(InstFull.j) then delete(InstFull.j)
end
if rtresult=3 then noop
end
Call DrawerCleanUp
DrawerCleanUp:
If D>0 then
do j=1 to d
rtezrequest("ÄéáãñáöÞ áõôïý ôïõ êáôáëüãïõ;" || NL ||,
InstDrawer.j,"Áêýñùóç | Íáé | ¼÷é | ÄéáãñáöÞ ¼ëùí")
if rtresult=1 then call Finished
if rtresult=0 then rtezrequest("Åßóôå óßãïõñïò ãéá áõôü;","Íáé | ¼÷é")
if rtresult=1 then do
j=d
call DeleteAllDrawers
call Finished
end
if rtresult=2 then do
if exists(InstDrawer.j) then delete(InstDrawer.j)
if exists(InstDrawer.j||".info") then delete(InstDrawer.j||".info")
end
if rtresult=3 then noop
end
Call Finished
Finished:
rtezrequest("ÔÝëïò Åñãáóßáò!")
exit
DeleteAll:
do j=1 to i
if exists(instfull.j) then delete(InstFull.j)
end
DeleteAllDrawers:
do j=1 to d
if exists(InstDrawer.j) then delete(InstDrawer.j)
if exists(InstDrawer.j||".info") then delete(InstDrawer.j||".info")
end